<!--导航栏页面-->
<template>
  <div class="contents">
    <div class="contents-header" v-if="$route.meta.navShow">
      <!--logo区域-->
      <div class="logo" ><img src="@/assets/static/image/thePartyBranch321/fanhui@2x.png" alt="logo" @click="returnsBtn">
      </div>
      <!--导航栏区域-->
      <header class="homePage">
        <div class="navigations">
          <div class="navigation" v-for="item in $store.state.thePartyBranch321.ziLuBy" :key="item.name">
            <router-link :to="item.path" active-class="active">{{ item.title }}</router-link>
          </div>
        </div>
      </header>
    </div>
    <div id="rolling">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
    export default {
      methods:{
        /**
         *返回上一页
         */
        returnsBtn(){
          this.$router.push({name:'Home'})
        },
      },
      /**
       * //切换路由自动回到顶部
       */
      updated(){
        const dom = document.getElementById('rolling')
        dom.scrollTo(0, 0);
      }
    }
</script>

<style scoped lang="less">
@import "@/assets/css/thePartyBranch321/thePartyBranch321.less";
</style>